Skip to content

feat(webapp): make IAM-mode object store path style configurable (PLT-1715) - #29

Open
jmho-govsignals wants to merge 1 commit into
gs-v4.4.4from
plt-1715-object-store-force-path-style
Open

jmho-govsignals wants to merge 1 commit into
gs-v4.4.4from
plt-1715-object-store-force-path-style

Conversation

@jmho-govsignals

Copy link
Copy Markdown
Collaborator

Goal

After this merges, an operator can switch the webapp's IAM-mode object store (no access keys, AWS credential chain) from path-style to virtual-hosted-style S3 addressing with one env var. FedStart needs this: Mission Manager only allows the FIPS endpoint s3-fips.us-gov-west-1.amazonaws.com, and that endpoint only works with virtual-hosted-style URLs (<bucket>.s3-fips.…/<key>). The IAM-mode client hardcoded forcePathStyle: true, so no configuration could produce a URL FedStart accepts. Task payloads and outputs over 128 KB, which go through PUT /api/v2/packets/*, fail there today.

With the default (true), every existing install keeps path-style addressing, IL5 included.

Changes

ObjectStoreClientConfig.forcePathStyle

apps/webapp/app/v3/objectStoreClient.server.ts

Changed: AwsSdkClient now takes forcePathStyle from its config, and ObjectStoreClient.create passes config.forcePathStyle ?? true. The static-credential Aws4FetchClient path is unchanged.

OBJECT_STORE_FORCE_PATH_STYLE, OBJECT_STORE_<PROTOCOL>_FORCE_PATH_STYLE

apps/webapp/app/env.server.ts, apps/webapp/app/v3/objectStore.server.ts, docs/self-hosting/env/webapp.mdx

Changed: a BoolEnv setting, default true, read for the default provider and for each named provider, and documented in the self-hosting env table. Only the IAM-mode client uses it.

Proves (tests in test/objectStoreClient.test.ts, no containers: presigning is local SigV4 signing with stubbed env credentials):

  • with no setting, presigned URLs stay path-style (s3-fips…/<bucket>/<key>)
  • with forcePathStyle: false, PUT and GET presigns are virtual-hosted (<bucket>.s3-fips…/<key>) and use AWS4-HMAC-SHA256

Checked by breaking it: with forcePathStyle: true hardcoded again, 2 of the 3 tests fail.

Not in this PR

  • No chart change. FedStart sets the variable through webapp.extraEnvVars.
  • ArtifactsService builds its own S3Client. It already uses virtual-hosted addressing in IAM mode and FedStart doesn't use it, so it is untouched.

Validation

  • vitest run test/objectStoreClient.test.ts: 3 passed.
  • oxfmt --check on the changed files: clean.
  • tsc on the client and the new test in isolation: no errors. The full apps/webapp typecheck could not run cleanly locally because workspace packages (@trigger.dev/core, @trigger.dev/database) were not built. All ~1,900 errors were "cannot find module" for those packages, not from this change.
  • Not run: the container-backed test/objectStore.test.ts.
  • Not verified on FedStart yet. That path-style is rejected on the FIPS endpoint comes from Palantir's Mission Manager S3 docs; a config-only test on FedStart staging (FIPS endpoint plus the new trigger-aws-role) will confirm it before this merges.

Ticket: PLT-1715

🤖 Generated with Claude Code

…-1715)

The AWS SDK object store client hardcoded forcePathStyle: true. AWS FIPS
endpoints (s3-fips.<region>.amazonaws.com), which FedStart requires, only
accept virtual-hosted-style requests, so IAM-mode packet uploads and
presigned URLs could not work there.

Add OBJECT_STORE_FORCE_PATH_STYLE (and OBJECT_STORE_<PROTOCOL>_FORCE_PATH_STYLE
for named providers), defaulting to true so existing installs keep
path-style addressing. Only the IAM-mode client reads it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jmho-govsignals
jmho-govsignals marked this pull request as ready for review November 18, 2026 21:38

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants